// $ANTLR 3.1.2 AmFm.g 2009-05-11 14:39:33

/*
 * Copyright 2009, Team Mondegreen:
 * Brian Hsieh - bh2181@columbia.edu
 * Eugene Yao - eyy2102@columbia.edu
 * Jake Amonette - jaa2149@columbia.edu
 * Tal Giat - tg2235@colubia.edu
 * 
 * This file is part of AMFM (A Minimal Fractal Music Language), a language created for
 * fractal music as part of the Programming Languages and Translator class at Columbia university.
 *
 * For more details go to: http://code.google.com/p/amfm/
 * 
 * AMFM is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * at your option any later version.
 * 
 * AMFM is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with AMFM.  If not, see <http://www.gnu.org/licenses/>. 
 */
 
package org.mondegreen.amfm.compiler;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings("unused")
public class AmFmLexer extends Lexer {
    public static final int ONE_TO_NINE=15;
    public static final int SS_PITCH=18;
    public static final int SS_RHYTHM=20;
    public static final int T__29=29;
    public static final int DEF=5;
    public static final int REST=10;
    public static final int SS_ALL=24;
    public static final int ACCIDENTAL=14;
    public static final int SS_RHYTHM_VOLUME=23;
    public static final int SS_PITCH_VOLUME=21;
    public static final int ID=8;
    public static final int INSTRUMENT=9;
    public static final int EOF=-1;
    public static final int TEN_AND_UP=26;
    public static final int NOTELETTERS_WITH_ACCIDENTAL_MINUS_F=13;
    public static final int NOTEUNIT=6;
    public static final int SS_VOLUME=19;
    public static final int T__30=30;
    public static final int SS_PITCH_RHYTHM=22;
    public static final int T__31=31;
    public static final int T__32=32;
    public static final int T__33=33;
    public static final int BOOLEAN=25;
    public static final int WS=28;
    public static final int T__34=34;
    public static final int T__35=35;
    public static final int T__36=36;
    public static final int NOTE=7;
    public static final int START=16;
    public static final int PROGRAM=4;
    public static final int VOLUME_LEVELS_MINUS_F=12;
    public static final int FRACTION=11;
    public static final int COMMENT=27;
    public static final int PLAY=17;
     // These methods are defined twice once for the lexer and once for the parser

    /** An error manager to register all compilation errors to */
    private AmFmErrorManager errorManager;

    /**
     * Sets the error manager this must be called before lexing or a NullPointerException will be throw in case of
     * semantic error because the code will try to add the error message to the manager. 
     * @param errorManager the compilation error manager 
     */
    public void setErrorManager(AmFmErrorManager errorManager) {
      this.errorManager = errorManager;
    }

    /**
     * Overriding antlr's method so we can redirect (and register) its error messages to AmFmErrorManager 
     * @param msg the lexing error message to capture
     */
    public void emitErrorMessage(String msg) {
      errorManager.addError(AmFmErrorCode.ANTLR_ERROR, msg);
    }



    // delegates
    // delegators

    public AmFmLexer() {;} 
    public AmFmLexer(CharStream input) {
        this(input, new RecognizerSharedState());
    }
    public AmFmLexer(CharStream input, RecognizerSharedState state) {
        super(input,state);

    }
    public String getGrammarFileName() { return "AmFm.g"; }

    // $ANTLR start "T__29"
    public final void mT__29() throws RecognitionException {
        try {
            int _type = T__29;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:56:7: ( 'seed' )
            // AmFm.g:56:9: 'seed'
            {
            match("seed"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__29"

    // $ANTLR start "T__30"
    public final void mT__30() throws RecognitionException {
        try {
            int _type = T__30;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:57:7: ( '{' )
            // AmFm.g:57:9: '{'
            {
            match('{'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__30"

    // $ANTLR start "T__31"
    public final void mT__31() throws RecognitionException {
        try {
            int _type = T__31;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:58:7: ( ';' )
            // AmFm.g:58:9: ';'
            {
            match(';'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__31"

    // $ANTLR start "T__32"
    public final void mT__32() throws RecognitionException {
        try {
            int _type = T__32;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:59:7: ( '}' )
            // AmFm.g:59:9: '}'
            {
            match('}'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__32"

    // $ANTLR start "T__33"
    public final void mT__33() throws RecognitionException {
        try {
            int _type = T__33;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:60:7: ( ',' )
            // AmFm.g:60:9: ','
            {
            match(','); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__33"

    // $ANTLR start "T__34"
    public final void mT__34() throws RecognitionException {
        try {
            int _type = T__34;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:61:7: ( 'F' )
            // AmFm.g:61:9: 'F'
            {
            match('F'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__34"

    // $ANTLR start "T__35"
    public final void mT__35() throws RecognitionException {
        try {
            int _type = T__35;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:62:7: ( '(' )
            // AmFm.g:62:9: '('
            {
            match('('); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__35"

    // $ANTLR start "T__36"
    public final void mT__36() throws RecognitionException {
        try {
            int _type = T__36;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:63:7: ( ')' )
            // AmFm.g:63:9: ')'
            {
            match(')'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__36"

    // $ANTLR start "START"
    public final void mSTART() throws RecognitionException {
        try {
            int _type = START;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:223:6: ( 'start' )
            // AmFm.g:223:8: 'start'
            {
            match("start"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "START"

    // $ANTLR start "PLAY"
    public final void mPLAY() throws RecognitionException {
        try {
            int _type = PLAY;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:224:5: ( 'play' )
            // AmFm.g:224:7: 'play'
            {
            match("play"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "PLAY"

    // $ANTLR start "SS_PITCH"
    public final void mSS_PITCH() throws RecognitionException {
        try {
            int _type = SS_PITCH;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:225:10: ( 'SSpitch' )
            // AmFm.g:225:12: 'SSpitch'
            {
            match("SSpitch"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "SS_PITCH"

    // $ANTLR start "SS_VOLUME"
    public final void mSS_VOLUME() throws RecognitionException {
        try {
            int _type = SS_VOLUME;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:226:10: ( 'SSvolume' )
            // AmFm.g:226:12: 'SSvolume'
            {
            match("SSvolume"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "SS_VOLUME"

    // $ANTLR start "SS_RHYTHM"
    public final void mSS_RHYTHM() throws RecognitionException {
        try {
            int _type = SS_RHYTHM;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:227:10: ( 'SSrhythm' )
            // AmFm.g:227:12: 'SSrhythm'
            {
            match("SSrhythm"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "SS_RHYTHM"

    // $ANTLR start "SS_PITCH_VOLUME"
    public final void mSS_PITCH_VOLUME() throws RecognitionException {
        try {
            int _type = SS_PITCH_VOLUME;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:228:16: ( 'SSpitch_volume' )
            // AmFm.g:228:18: 'SSpitch_volume'
            {
            match("SSpitch_volume"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "SS_PITCH_VOLUME"

    // $ANTLR start "SS_PITCH_RHYTHM"
    public final void mSS_PITCH_RHYTHM() throws RecognitionException {
        try {
            int _type = SS_PITCH_RHYTHM;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:229:16: ( 'SSpitch_rhythm' )
            // AmFm.g:229:18: 'SSpitch_rhythm'
            {
            match("SSpitch_rhythm"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "SS_PITCH_RHYTHM"

    // $ANTLR start "SS_RHYTHM_VOLUME"
    public final void mSS_RHYTHM_VOLUME() throws RecognitionException {
        try {
            int _type = SS_RHYTHM_VOLUME;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:230:17: ( 'SSrhythm_volume' )
            // AmFm.g:230:19: 'SSrhythm_volume'
            {
            match("SSrhythm_volume"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "SS_RHYTHM_VOLUME"

    // $ANTLR start "SS_ALL"
    public final void mSS_ALL() throws RecognitionException {
        try {
            int _type = SS_ALL;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:231:7: ( 'SSall' )
            // AmFm.g:231:9: 'SSall'
            {
            match("SSall"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "SS_ALL"

    // $ANTLR start "COMMENT"
    public final void mCOMMENT() throws RecognitionException {
        try {
            int _type = COMMENT;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:233:9: ( '//' (~ ( '\\n' | '\\r' ) )* ( '\\n' | '\\r' ( '\\n' )? )? )
            // AmFm.g:233:11: '//' (~ ( '\\n' | '\\r' ) )* ( '\\n' | '\\r' ( '\\n' )? )?
            {
            match("//"); 

            // AmFm.g:233:15: (~ ( '\\n' | '\\r' ) )*
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( ((LA1_0>='\u0000' && LA1_0<='\t')||(LA1_0>='\u000B' && LA1_0<='\f')||(LA1_0>='\u000E' && LA1_0<='\uFFFF')) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // AmFm.g:233:16: ~ ( '\\n' | '\\r' )
            	    {
            	    if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
            	        input.consume();

            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        recover(mse);
            	        throw mse;}


            	    }
            	    break;

            	default :
            	    break loop1;
                }
            } while (true);

            // AmFm.g:233:30: ( '\\n' | '\\r' ( '\\n' )? )?
            int alt3=3;
            int LA3_0 = input.LA(1);

            if ( (LA3_0=='\n') ) {
                alt3=1;
            }
            else if ( (LA3_0=='\r') ) {
                alt3=2;
            }
            switch (alt3) {
                case 1 :
                    // AmFm.g:233:31: '\\n'
                    {
                    match('\n'); 

                    }
                    break;
                case 2 :
                    // AmFm.g:233:36: '\\r' ( '\\n' )?
                    {
                    match('\r'); 
                    // AmFm.g:233:40: ( '\\n' )?
                    int alt2=2;
                    int LA2_0 = input.LA(1);

                    if ( (LA2_0=='\n') ) {
                        alt2=1;
                    }
                    switch (alt2) {
                        case 1 :
                            // AmFm.g:233:41: '\\n'
                            {
                            match('\n'); 

                            }
                            break;

                    }


                    }
                    break;

            }

            skip();

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "COMMENT"

    // $ANTLR start "INSTRUMENT"
    public final void mINSTRUMENT() throws RecognitionException {
        try {
            int _type = INSTRUMENT;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:236:12: ( 'PIANO' | 'VIOLIN' | 'CELLO' | 'TRUMPET' | 'VIOLA' | 'FLUTE' )
            int alt4=6;
            alt4 = dfa4.predict(input);
            switch (alt4) {
                case 1 :
                    // AmFm.g:236:14: 'PIANO'
                    {
                    match("PIANO"); 


                    }
                    break;
                case 2 :
                    // AmFm.g:236:24: 'VIOLIN'
                    {
                    match("VIOLIN"); 


                    }
                    break;
                case 3 :
                    // AmFm.g:236:35: 'CELLO'
                    {
                    match("CELLO"); 


                    }
                    break;
                case 4 :
                    // AmFm.g:236:45: 'TRUMPET'
                    {
                    match("TRUMPET"); 


                    }
                    break;
                case 5 :
                    // AmFm.g:236:57: 'VIOLA'
                    {
                    match("VIOLA"); 


                    }
                    break;
                case 6 :
                    // AmFm.g:236:67: 'FLUTE'
                    {
                    match("FLUTE"); 


                    }
                    break;

            }
            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "INSTRUMENT"

    // $ANTLR start "NOTELETTERS_WITH_ACCIDENTAL_MINUS_F"
    public final void mNOTELETTERS_WITH_ACCIDENTAL_MINUS_F() throws RecognitionException {
        try {
            int _type = NOTELETTERS_WITH_ACCIDENTAL_MINUS_F;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:237:37: ( ( 'A' .. 'E' | 'G' ) ( ACCIDENTAL )? | 'F' ACCIDENTAL )
            int alt6=2;
            int LA6_0 = input.LA(1);

            if ( ((LA6_0>='A' && LA6_0<='E')||LA6_0=='G') ) {
                alt6=1;
            }
            else if ( (LA6_0=='F') ) {
                alt6=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 6, 0, input);

                throw nvae;
            }
            switch (alt6) {
                case 1 :
                    // AmFm.g:237:39: ( 'A' .. 'E' | 'G' ) ( ACCIDENTAL )?
                    {
                    if ( (input.LA(1)>='A' && input.LA(1)<='E')||input.LA(1)=='G' ) {
                        input.consume();

                    }
                    else {
                        MismatchedSetException mse = new MismatchedSetException(null,input);
                        recover(mse);
                        throw mse;}

                    // AmFm.g:237:55: ( ACCIDENTAL )?
                    int alt5=2;
                    int LA5_0 = input.LA(1);

                    if ( (LA5_0=='#'||LA5_0=='b'||LA5_0=='x') ) {
                        alt5=1;
                    }
                    switch (alt5) {
                        case 1 :
                            // AmFm.g:237:55: ACCIDENTAL
                            {
                            mACCIDENTAL(); 

                            }
                            break;

                    }


                    }
                    break;
                case 2 :
                    // AmFm.g:237:69: 'F' ACCIDENTAL
                    {
                    match('F'); 
                    mACCIDENTAL(); 

                    }
                    break;

            }
            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "NOTELETTERS_WITH_ACCIDENTAL_MINUS_F"

    // $ANTLR start "REST"
    public final void mREST() throws RecognitionException {
        try {
            int _type = REST;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:238:5: ( 'R' )
            // AmFm.g:238:7: 'R'
            {
            match('R'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "REST"

    // $ANTLR start "VOLUME_LEVELS_MINUS_F"
    public final void mVOLUME_LEVELS_MINUS_F() throws RecognitionException {
        try {
            int _type = VOLUME_LEVELS_MINUS_F;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:239:23: ( 'PPP' | 'PP' | 'P' | 'MP' | 'MF' | 'FF' | 'FFF' )
            int alt7=7;
            alt7 = dfa7.predict(input);
            switch (alt7) {
                case 1 :
                    // AmFm.g:239:25: 'PPP'
                    {
                    match("PPP"); 


                    }
                    break;
                case 2 :
                    // AmFm.g:239:33: 'PP'
                    {
                    match("PP"); 


                    }
                    break;
                case 3 :
                    // AmFm.g:239:40: 'P'
                    {
                    match('P'); 

                    }
                    break;
                case 4 :
                    // AmFm.g:239:46: 'MP'
                    {
                    match("MP"); 


                    }
                    break;
                case 5 :
                    // AmFm.g:239:53: 'MF'
                    {
                    match("MF"); 


                    }
                    break;
                case 6 :
                    // AmFm.g:239:60: 'FF'
                    {
                    match("FF"); 


                    }
                    break;
                case 7 :
                    // AmFm.g:239:67: 'FFF'
                    {
                    match("FFF"); 


                    }
                    break;

            }
            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "VOLUME_LEVELS_MINUS_F"

    // $ANTLR start "ACCIDENTAL"
    public final void mACCIDENTAL() throws RecognitionException {
        try {
            // AmFm.g:241:12: ( ( '#' | 'b' | 'bb' | 'x' ) )
            // AmFm.g:241:14: ( '#' | 'b' | 'bb' | 'x' )
            {
            // AmFm.g:241:14: ( '#' | 'b' | 'bb' | 'x' )
            int alt8=4;
            switch ( input.LA(1) ) {
            case '#':
                {
                alt8=1;
                }
                break;
            case 'b':
                {
                int LA8_2 = input.LA(2);

                if ( (LA8_2=='b') ) {
                    alt8=3;
                }
                else {
                    alt8=2;}
                }
                break;
            case 'x':
                {
                alt8=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 8, 0, input);

                throw nvae;
            }

            switch (alt8) {
                case 1 :
                    // AmFm.g:241:15: '#'
                    {
                    match('#'); 

                    }
                    break;
                case 2 :
                    // AmFm.g:241:21: 'b'
                    {
                    match('b'); 

                    }
                    break;
                case 3 :
                    // AmFm.g:241:27: 'bb'
                    {
                    match("bb"); 


                    }
                    break;
                case 4 :
                    // AmFm.g:241:34: 'x'
                    {
                    match('x'); 

                    }
                    break;

            }


            }

        }
        finally {
        }
    }
    // $ANTLR end "ACCIDENTAL"

    // $ANTLR start "BOOLEAN"
    public final void mBOOLEAN() throws RecognitionException {
        try {
            int _type = BOOLEAN;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:242:9: ( 'TRUE' | 'FALSE' )
            int alt9=2;
            int LA9_0 = input.LA(1);

            if ( (LA9_0=='T') ) {
                alt9=1;
            }
            else if ( (LA9_0=='F') ) {
                alt9=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 9, 0, input);

                throw nvae;
            }
            switch (alt9) {
                case 1 :
                    // AmFm.g:242:11: 'TRUE'
                    {
                    match("TRUE"); 


                    }
                    break;
                case 2 :
                    // AmFm.g:242:20: 'FALSE'
                    {
                    match("FALSE"); 


                    }
                    break;

            }
            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "BOOLEAN"

    // $ANTLR start "ID"
    public final void mID() throws RecognitionException {
        try {
            int _type = ID;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:243:4: ( ( 'a' .. 'z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )* )
            // AmFm.g:243:6: ( 'a' .. 'z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )*
            {
            // AmFm.g:243:6: ( 'a' .. 'z' )
            // AmFm.g:243:7: 'a' .. 'z'
            {
            matchRange('a','z'); 

            }

            // AmFm.g:243:16: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' )*
            loop10:
            do {
                int alt10=2;
                int LA10_0 = input.LA(1);

                if ( ((LA10_0>='0' && LA10_0<='9')||(LA10_0>='A' && LA10_0<='Z')||(LA10_0>='a' && LA10_0<='z')) ) {
                    alt10=1;
                }


                switch (alt10) {
            	case 1 :
            	    // AmFm.g:
            	    {
            	    if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {
            	        input.consume();

            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        recover(mse);
            	        throw mse;}


            	    }
            	    break;

            	default :
            	    break loop10;
                }
            } while (true);


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "ID"

    // $ANTLR start "FRACTION"
    public final void mFRACTION() throws RecognitionException {
        try {
            int _type = FRACTION;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:244:10: ( ( ONE_TO_NINE | TEN_AND_UP ) '/' ( ONE_TO_NINE | TEN_AND_UP ) )
            // AmFm.g:244:12: ( ONE_TO_NINE | TEN_AND_UP ) '/' ( ONE_TO_NINE | TEN_AND_UP )
            {
            // AmFm.g:244:12: ( ONE_TO_NINE | TEN_AND_UP )
            int alt11=2;
            int LA11_0 = input.LA(1);

            if ( ((LA11_0>='1' && LA11_0<='9')) ) {
                int LA11_1 = input.LA(2);

                if ( ((LA11_1>='0' && LA11_1<='9')) ) {
                    alt11=2;
                }
                else if ( (LA11_1=='/') ) {
                    alt11=1;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 11, 1, input);

                    throw nvae;
                }
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 11, 0, input);

                throw nvae;
            }
            switch (alt11) {
                case 1 :
                    // AmFm.g:244:13: ONE_TO_NINE
                    {
                    mONE_TO_NINE(); 

                    }
                    break;
                case 2 :
                    // AmFm.g:244:25: TEN_AND_UP
                    {
                    mTEN_AND_UP(); 

                    }
                    break;

            }

            match('/'); 
            // AmFm.g:244:39: ( ONE_TO_NINE | TEN_AND_UP )
            int alt12=2;
            int LA12_0 = input.LA(1);

            if ( ((LA12_0>='1' && LA12_0<='9')) ) {
                int LA12_1 = input.LA(2);

                if ( ((LA12_1>='0' && LA12_1<='9')) ) {
                    alt12=2;
                }
                else {
                    alt12=1;}
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 12, 0, input);

                throw nvae;
            }
            switch (alt12) {
                case 1 :
                    // AmFm.g:244:40: ONE_TO_NINE
                    {
                    mONE_TO_NINE(); 

                    }
                    break;
                case 2 :
                    // AmFm.g:244:52: TEN_AND_UP
                    {
                    mTEN_AND_UP(); 

                    }
                    break;

            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "FRACTION"

    // $ANTLR start "ONE_TO_NINE"
    public final void mONE_TO_NINE() throws RecognitionException {
        try {
            int _type = ONE_TO_NINE;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:245:12: ( '1' .. '9' )
            // AmFm.g:245:14: '1' .. '9'
            {
            matchRange('1','9'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "ONE_TO_NINE"

    // $ANTLR start "TEN_AND_UP"
    public final void mTEN_AND_UP() throws RecognitionException {
        try {
            int _type = TEN_AND_UP;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:246:11: ( ONE_TO_NINE ( '0' .. '9' )+ )
            // AmFm.g:246:13: ONE_TO_NINE ( '0' .. '9' )+
            {
            mONE_TO_NINE(); 
            // AmFm.g:246:24: ( '0' .. '9' )+
            int cnt13=0;
            loop13:
            do {
                int alt13=2;
                int LA13_0 = input.LA(1);

                if ( ((LA13_0>='0' && LA13_0<='9')) ) {
                    alt13=1;
                }


                switch (alt13) {
            	case 1 :
            	    // AmFm.g:246:25: '0' .. '9'
            	    {
            	    matchRange('0','9'); 

            	    }
            	    break;

            	default :
            	    if ( cnt13 >= 1 ) break loop13;
                        EarlyExitException eee =
                            new EarlyExitException(13, input);
                        throw eee;
                }
                cnt13++;
            } while (true);


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "TEN_AND_UP"

    // $ANTLR start "WS"
    public final void mWS() throws RecognitionException {
        try {
            int _type = WS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // AmFm.g:247:4: ( ( ' ' | '\\t' | '\\n' | '\\r' )+ )
            // AmFm.g:247:6: ( ' ' | '\\t' | '\\n' | '\\r' )+
            {
            // AmFm.g:247:6: ( ' ' | '\\t' | '\\n' | '\\r' )+
            int cnt14=0;
            loop14:
            do {
                int alt14=2;
                int LA14_0 = input.LA(1);

                if ( ((LA14_0>='\t' && LA14_0<='\n')||LA14_0=='\r'||LA14_0==' ') ) {
                    alt14=1;
                }


                switch (alt14) {
            	case 1 :
            	    // AmFm.g:
            	    {
            	    if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
            	        input.consume();

            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        recover(mse);
            	        throw mse;}


            	    }
            	    break;

            	default :
            	    if ( cnt14 >= 1 ) break loop14;
                        EarlyExitException eee =
                            new EarlyExitException(14, input);
                        throw eee;
                }
                cnt14++;
            } while (true);

            skip();

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "WS"

    public void mTokens() throws RecognitionException {
        // AmFm.g:1:8: ( T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | START | PLAY | SS_PITCH | SS_VOLUME | SS_RHYTHM | SS_PITCH_VOLUME | SS_PITCH_RHYTHM | SS_RHYTHM_VOLUME | SS_ALL | COMMENT | INSTRUMENT | NOTELETTERS_WITH_ACCIDENTAL_MINUS_F | REST | VOLUME_LEVELS_MINUS_F | BOOLEAN | ID | FRACTION | ONE_TO_NINE | TEN_AND_UP | WS )
        int alt15=28;
        alt15 = dfa15.predict(input);
        switch (alt15) {
            case 1 :
                // AmFm.g:1:10: T__29
                {
                mT__29(); 

                }
                break;
            case 2 :
                // AmFm.g:1:16: T__30
                {
                mT__30(); 

                }
                break;
            case 3 :
                // AmFm.g:1:22: T__31
                {
                mT__31(); 

                }
                break;
            case 4 :
                // AmFm.g:1:28: T__32
                {
                mT__32(); 

                }
                break;
            case 5 :
                // AmFm.g:1:34: T__33
                {
                mT__33(); 

                }
                break;
            case 6 :
                // AmFm.g:1:40: T__34
                {
                mT__34(); 

                }
                break;
            case 7 :
                // AmFm.g:1:46: T__35
                {
                mT__35(); 

                }
                break;
            case 8 :
                // AmFm.g:1:52: T__36
                {
                mT__36(); 

                }
                break;
            case 9 :
                // AmFm.g:1:58: START
                {
                mSTART(); 

                }
                break;
            case 10 :
                // AmFm.g:1:64: PLAY
                {
                mPLAY(); 

                }
                break;
            case 11 :
                // AmFm.g:1:69: SS_PITCH
                {
                mSS_PITCH(); 

                }
                break;
            case 12 :
                // AmFm.g:1:78: SS_VOLUME
                {
                mSS_VOLUME(); 

                }
                break;
            case 13 :
                // AmFm.g:1:88: SS_RHYTHM
                {
                mSS_RHYTHM(); 

                }
                break;
            case 14 :
                // AmFm.g:1:98: SS_PITCH_VOLUME
                {
                mSS_PITCH_VOLUME(); 

                }
                break;
            case 15 :
                // AmFm.g:1:114: SS_PITCH_RHYTHM
                {
                mSS_PITCH_RHYTHM(); 

                }
                break;
            case 16 :
                // AmFm.g:1:130: SS_RHYTHM_VOLUME
                {
                mSS_RHYTHM_VOLUME(); 

                }
                break;
            case 17 :
                // AmFm.g:1:147: SS_ALL
                {
                mSS_ALL(); 

                }
                break;
            case 18 :
                // AmFm.g:1:154: COMMENT
                {
                mCOMMENT(); 

                }
                break;
            case 19 :
                // AmFm.g:1:162: INSTRUMENT
                {
                mINSTRUMENT(); 

                }
                break;
            case 20 :
                // AmFm.g:1:173: NOTELETTERS_WITH_ACCIDENTAL_MINUS_F
                {
                mNOTELETTERS_WITH_ACCIDENTAL_MINUS_F(); 

                }
                break;
            case 21 :
                // AmFm.g:1:209: REST
                {
                mREST(); 

                }
                break;
            case 22 :
                // AmFm.g:1:214: VOLUME_LEVELS_MINUS_F
                {
                mVOLUME_LEVELS_MINUS_F(); 

                }
                break;
            case 23 :
                // AmFm.g:1:236: BOOLEAN
                {
                mBOOLEAN(); 

                }
                break;
            case 24 :
                // AmFm.g:1:244: ID
                {
                mID(); 

                }
                break;
            case 25 :
                // AmFm.g:1:247: FRACTION
                {
                mFRACTION(); 

                }
                break;
            case 26 :
                // AmFm.g:1:256: ONE_TO_NINE
                {
                mONE_TO_NINE(); 

                }
                break;
            case 27 :
                // AmFm.g:1:268: TEN_AND_UP
                {
                mTEN_AND_UP(); 

                }
                break;
            case 28 :
                // AmFm.g:1:279: WS
                {
                mWS(); 

                }
                break;

        }

    }


    protected DFA4 dfa4 = new DFA4(this);
    protected DFA7 dfa7 = new DFA7(this);
    protected DFA15 dfa15 = new DFA15(this);
    static final String DFA4_eotS =
        "\13\uffff";
    static final String DFA4_eofS =
        "\13\uffff";
    static final String DFA4_minS =
        "\1\103\1\uffff\1\111\3\uffff\1\117\1\114\1\101\2\uffff";
    static final String DFA4_maxS =
        "\1\126\1\uffff\1\111\3\uffff\1\117\1\114\1\111\2\uffff";
    static final String DFA4_acceptS =
        "\1\uffff\1\1\1\uffff\1\3\1\4\1\6\3\uffff\1\2\1\5";
    static final String DFA4_specialS =
        "\13\uffff}>";
    static final String[] DFA4_transitionS = {
            "\1\3\2\uffff\1\5\11\uffff\1\1\3\uffff\1\4\1\uffff\1\2",
            "",
            "\1\6",
            "",
            "",
            "",
            "\1\7",
            "\1\10",
            "\1\12\7\uffff\1\11",
            "",
            ""
    };

    static final short[] DFA4_eot = DFA.unpackEncodedString(DFA4_eotS);
    static final short[] DFA4_eof = DFA.unpackEncodedString(DFA4_eofS);
    static final char[] DFA4_min = DFA.unpackEncodedStringToUnsignedChars(DFA4_minS);
    static final char[] DFA4_max = DFA.unpackEncodedStringToUnsignedChars(DFA4_maxS);
    static final short[] DFA4_accept = DFA.unpackEncodedString(DFA4_acceptS);
    static final short[] DFA4_special = DFA.unpackEncodedString(DFA4_specialS);
    static final short[][] DFA4_transition;

    static {
        int numStates = DFA4_transitionS.length;
        DFA4_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA4_transition[i] = DFA.unpackEncodedString(DFA4_transitionS[i]);
        }
    }

    class DFA4 extends DFA {

        public DFA4(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 4;
            this.eot = DFA4_eot;
            this.eof = DFA4_eof;
            this.min = DFA4_min;
            this.max = DFA4_max;
            this.accept = DFA4_accept;
            this.special = DFA4_special;
            this.transition = DFA4_transition;
        }
        public String getDescription() {
            return "236:1: INSTRUMENT : ( 'PIANO' | 'VIOLIN' | 'CELLO' | 'TRUMPET' | 'VIOLA' | 'FLUTE' );";
        }
    }
    static final String DFA7_eotS =
        "\1\uffff\1\5\2\uffff\1\12\3\uffff\1\14\4\uffff";
    static final String DFA7_eofS =
        "\15\uffff";
    static final String DFA7_minS =
        "\1\106\1\120\2\106\1\120\3\uffff\1\106\4\uffff";
    static final String DFA7_maxS =
        "\3\120\1\106\1\120\3\uffff\1\106\4\uffff";
    static final String DFA7_acceptS =
        "\5\uffff\1\3\1\4\1\5\1\uffff\1\1\1\2\1\7\1\6";
    static final String DFA7_specialS =
        "\15\uffff}>";
    static final String[] DFA7_transitionS = {
            "\1\3\6\uffff\1\2\2\uffff\1\1",
            "\1\4",
            "\1\7\11\uffff\1\6",
            "\1\10",
            "\1\11",
            "",
            "",
            "",
            "\1\13",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA7_eot = DFA.unpackEncodedString(DFA7_eotS);
    static final short[] DFA7_eof = DFA.unpackEncodedString(DFA7_eofS);
    static final char[] DFA7_min = DFA.unpackEncodedStringToUnsignedChars(DFA7_minS);
    static final char[] DFA7_max = DFA.unpackEncodedStringToUnsignedChars(DFA7_maxS);
    static final short[] DFA7_accept = DFA.unpackEncodedString(DFA7_acceptS);
    static final short[] DFA7_special = DFA.unpackEncodedString(DFA7_specialS);
    static final short[][] DFA7_transition;

    static {
        int numStates = DFA7_transitionS.length;
        DFA7_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA7_transition[i] = DFA.unpackEncodedString(DFA7_transitionS[i]);
        }
    }

    class DFA7 extends DFA {

        public DFA7(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 7;
            this.eot = DFA7_eot;
            this.eof = DFA7_eof;
            this.min = DFA7_min;
            this.max = DFA7_max;
            this.accept = DFA7_accept;
            this.special = DFA7_special;
            this.transition = DFA7_transition;
        }
        public String getDescription() {
            return "239:1: VOLUME_LEVELS_MINUS_F : ( 'PPP' | 'PP' | 'P' | 'MP' | 'MF' | 'FF' | 'FFF' );";
        }
    }
    static final String DFA15_eotS =
        "\1\uffff\1\23\4\uffff\1\31\2\uffff\1\23\2\uffff\1\22\1\uffff\1\20"+
        "\5\uffff\1\35\1\uffff\2\23\2\uffff\1\23\3\uffff\1\50\1\uffff\3\23"+
        "\6\uffff\1\56\1\23\1\60\3\uffff\1\63\6\uffff\1\71\3\uffff\1\76\4"+
        "\uffff";
    static final String DFA15_eofS =
        "\77\uffff";
    static final String DFA15_minS =
        "\1\11\1\145\4\uffff\1\43\2\uffff\1\154\1\123\1\uffff\1\111\1\uffff"+
        "\1\105\1\122\4\uffff\1\57\1\uffff\1\145\1\141\2\uffff\2\141\1\125"+
        "\1\uffff\1\57\1\uffff\1\144\1\162\1\171\1\151\1\uffff\1\150\1\uffff"+
        "\1\105\1\uffff\1\60\1\164\1\60\1\164\1\171\1\uffff\1\60\1\uffff"+
        "\1\143\1\164\1\uffff\2\150\1\137\1\155\1\162\1\uffff\1\137\4\uffff";
    static final String DFA15_maxS =
        "\1\175\1\164\4\uffff\1\170\2\uffff\1\154\1\123\1\uffff\1\111\1\uffff"+
        "\1\105\1\122\4\uffff\1\71\1\uffff\1\145\1\141\2\uffff\1\141\1\166"+
        "\1\125\1\uffff\1\71\1\uffff\1\144\1\162\1\171\1\151\1\uffff\1\150"+
        "\1\uffff\1\115\1\uffff\1\172\1\164\1\172\1\164\1\171\1\uffff\1\172"+
        "\1\uffff\1\143\1\164\1\uffff\2\150\1\137\1\155\1\166\1\uffff\1\137"+
        "\4\uffff";
    static final String DFA15_acceptS =
        "\2\uffff\1\2\1\3\1\4\1\5\1\uffff\1\7\1\10\2\uffff\1\22\1\uffff\1"+
        "\23\2\uffff\1\24\1\25\1\26\1\30\1\uffff\1\34\2\uffff\1\27\1\6\3"+
        "\uffff\1\32\1\uffff\1\31\4\uffff\1\14\1\uffff\1\21\1\uffff\1\33"+
        "\5\uffff\1\1\1\uffff\1\12\2\uffff\1\11\5\uffff\1\13\1\uffff\1\16"+
        "\1\17\1\20\1\15";
    static final String DFA15_specialS =
        "\77\uffff}>";
    static final String[] DFA15_transitionS = {
            "\2\25\2\uffff\1\25\22\uffff\1\25\7\uffff\1\7\1\10\2\uffff\1"+
            "\5\2\uffff\1\13\1\uffff\11\24\1\uffff\1\3\5\uffff\2\20\1\16"+
            "\2\20\1\6\1\20\5\uffff\1\22\2\uffff\1\14\1\uffff\1\21\1\12\1"+
            "\17\1\uffff\1\15\12\uffff\17\23\1\11\2\23\1\1\7\23\1\2\1\uffff"+
            "\1\4",
            "\1\26\16\uffff\1\27",
            "",
            "",
            "",
            "",
            "\1\20\35\uffff\1\30\4\uffff\1\22\5\uffff\1\15\25\uffff\1\20"+
            "\25\uffff\1\20",
            "",
            "",
            "\1\32",
            "\1\33",
            "",
            "\1\15",
            "",
            "\1\15",
            "\1\34",
            "",
            "",
            "",
            "",
            "\1\37\12\36",
            "",
            "\1\40",
            "\1\41",
            "",
            "",
            "\1\42",
            "\1\46\16\uffff\1\43\1\uffff\1\45\3\uffff\1\44",
            "\1\47",
            "",
            "\1\37\12\36",
            "",
            "\1\51",
            "\1\52",
            "\1\53",
            "\1\54",
            "",
            "\1\55",
            "",
            "\1\30\7\uffff\1\15",
            "",
            "\12\23\7\uffff\32\23\6\uffff\32\23",
            "\1\57",
            "\12\23\7\uffff\32\23\6\uffff\32\23",
            "\1\61",
            "\1\62",
            "",
            "\12\23\7\uffff\32\23\6\uffff\32\23",
            "",
            "\1\64",
            "\1\65",
            "",
            "\1\66",
            "\1\67",
            "\1\70",
            "\1\72",
            "\1\74\3\uffff\1\73",
            "",
            "\1\75",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA15_eot = DFA.unpackEncodedString(DFA15_eotS);
    static final short[] DFA15_eof = DFA.unpackEncodedString(DFA15_eofS);
    static final char[] DFA15_min = DFA.unpackEncodedStringToUnsignedChars(DFA15_minS);
    static final char[] DFA15_max = DFA.unpackEncodedStringToUnsignedChars(DFA15_maxS);
    static final short[] DFA15_accept = DFA.unpackEncodedString(DFA15_acceptS);
    static final short[] DFA15_special = DFA.unpackEncodedString(DFA15_specialS);
    static final short[][] DFA15_transition;

    static {
        int numStates = DFA15_transitionS.length;
        DFA15_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA15_transition[i] = DFA.unpackEncodedString(DFA15_transitionS[i]);
        }
    }

    class DFA15 extends DFA {

        public DFA15(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 15;
            this.eot = DFA15_eot;
            this.eof = DFA15_eof;
            this.min = DFA15_min;
            this.max = DFA15_max;
            this.accept = DFA15_accept;
            this.special = DFA15_special;
            this.transition = DFA15_transition;
        }
        public String getDescription() {
            return "1:1: Tokens : ( T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | START | PLAY | SS_PITCH | SS_VOLUME | SS_RHYTHM | SS_PITCH_VOLUME | SS_PITCH_RHYTHM | SS_RHYTHM_VOLUME | SS_ALL | COMMENT | INSTRUMENT | NOTELETTERS_WITH_ACCIDENTAL_MINUS_F | REST | VOLUME_LEVELS_MINUS_F | BOOLEAN | ID | FRACTION | ONE_TO_NINE | TEN_AND_UP | WS );";
        }
    }
 

}